file_name='input.txt'
line_count=0
word_count=0
character_count=0
with open(file_name,'r',encoding='utf-8') as file:
    for line in file:
        word=line.split()
        line_count+=1
        character_count+=len(line)



def getWords(filepath):
    file = open(filepath)
    wordOne=[]
    while(file):
        line = file.readline()
        word = line.split('/')
        wordOne.extend(word)
        if (not line):          
            break  
    wordtwo=[]
    for i in wordOne:
        wordtwo.extend(i.split())
    return wordtwo
    word3 = []
    for i in wordtwo:
        word3.extend(i.split('\t'))
    return word3
    word4 = []
    for i in word3:
        word4.extend(i.split('\n'))
    print('单词数：',len(word4))
print('行数：',line_count)
print('字符数：',character_count)
                                                      
